package com.liry.security.controller;

import org.springframework.context.annotation.Role;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author ALI
 * @since 2023/6/10
 */
@RestController
public class IndexController {

    @PreAuthorize("hasAnyRole('dd')")
    @GetMapping("/getData")
    public String getData() {
        return "getData";
    }

    @GetMapping("/getData2")
    public String getData2() {
        return "getData2";
    }

    @GetMapping("/getData3")
    public String getData3() {
        return "getData3";
    }

    @GetMapping("/getData4")
    public String getData4() {
        return "getData4";
    }

    @GetMapping("/getData5")
    public String getData5() {
        return "getData5";
    }

    @GetMapping("/getData6")
    public String getData6() {
        return "getData6";
    }

    @GetMapping("/getData7")
    public String getData7() {
        return "getData7";
    }
}
